<%@page import="java.util.Date"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/common/basePath.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="../js/jquery-1.7.min.js"></script>
<script type="text/javascript" src="../js/jquery.form.js"></script>
<script type="text/javascript">

function toSubmit(){
	if($("#type_name").val()==""){
		alert("请输入类型名称？");
		return false;
	}
	if($("#order_num").val()==""){
		alert("请输入排序？");
		return false;
	}
	
	var numReg = /^\[1-9]?\d*$/;
	if(numReg.test($("#order_num").val())){
		alert("排序必须位数字！");
		return false;
	}
	$("#submit").attr("disabled","disabled");
	$("#submit").val("请稍后...");
	return true;
} 
</script>
</head>
<body>
<form id="myForm" action="zspj_type_adddo.class.jsp" method="post" onsubmit="return toSubmit()">
	<table>
		<tr>
			<td>类型名称</td>
			<td><input type="text" name="type_name" id="type_name" /> </td>
		</tr>
		<tr>
			<td>排序</td>
			<td><input type="text" name="order_num" id="order_num" /> </td>
		</tr>
		<tr>
			<td>
			</td>
			<td>
				<input id="submit" type="submit" value="提交" />
				<input type="button" value="回到列表页" onclick="window.location.href='zspj_type_list.jsp?r=<%=new Date().getTime() %>'" />
			</td>
		</tr>
	</table>
</form>
</body>
</html>